﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Algorithm.Middle_33_Search
{
    class MainProject
    {
        static void Main(string[] args)
        {
            int[] array = new int[]
            {
              4,5,6,7,0,1,2
            };
            Console.WriteLine(Search(array,3));
            //Console.WriteLine(IsPalindrome(1000021));
            Console.ReadKey();
        }
        public static int Search(int[] nums, int target)
        {
            for (int i = 0; i < nums.Length; i++)
            {
                if (nums[i] == target)
                {
                    return i;
                }
            }
            return -1;
        }
    }
}
